Exemple #1
0
        public static void Login(string listenerID)
        {
            try
            {
                webForm = new WebForm();

                object missing = System.Type.Missing;
                object url = CreateLoginUrl(listenerID);

                webForm.Browser.Navigate2(ref url, ref missing, ref missing, ref missing, ref missing);

                new Timer(new TimerCallback(FinalizeLogin), null, 1000*15, -1);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                Debug.WriteLine(ex.StackTrace);
            }
        }
Exemple #2
0
        //
        // Public methods
        //

        #region public static void Login(string listenerID)
        public static void Login(string listenerID)
        {
            try
            {
                webForm = new WebForm();

                object missing = System.Type.Missing;
                object url     = CreateLoginUrl(listenerID);

                webForm.Browser.Navigate2(ref url, ref missing, ref missing, ref missing, ref missing);

                new Timer(new TimerCallback(FinalizeLogin), null, 1000 * 15, -1);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                Debug.WriteLine(ex.StackTrace);
            }
        }
Exemple #3
0
 private static void FinalizeLogin(object state)
 {
     try
     {
         webForm.Close();
         webForm = null;
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message);
         Debug.WriteLine(ex.StackTrace);
     }
 }