public static void ShowFacebookLogin(string url, string urlFirst, Form parent)
        {
            if (instance != null)
            {
                try
                {
                    instance.Close();
                    instance = null;
                }
                catch (Exception)
                {
                }
            }
            vidLoaded = false;
            FacebookWindow window = new FacebookWindow();

            m_parent = null;
            Point point = new Point(parent.Location.X + ((parent.Width - window.Width) / 2), parent.Location.Y + ((parent.Height - window.Height) / 2));

            window.Location = point;
            window.Show(parent);
            instance = window;
            while (!vidLoaded)
            {
                Thread.Sleep(100);
                Application.DoEvents();
            }
            Thread.Sleep(500);
            if (urlFirst.Length > 0)
            {
                futureURL = url;
                url       = urlFirst;
            }
            window.webBrowser1.Navigate(url);
        }
 public static void ShowFacebookLogin(string url, string urlFirst, Form parent)
 {
     if (instance != null)
     {
         try
         {
             instance.Close();
             instance = null;
         }
         catch (Exception)
         {
         }
     }
     vidLoaded = false;
     FacebookWindow window = new FacebookWindow();
     m_parent = null;
     Point point = new Point(parent.Location.X + ((parent.Width - window.Width) / 2), parent.Location.Y + ((parent.Height - window.Height) / 2));
     window.Location = point;
     window.Show(parent);
     instance = window;
     while (!vidLoaded)
     {
         Thread.Sleep(100);
         Application.DoEvents();
     }
     Thread.Sleep(500);
     if (urlFirst.Length > 0)
     {
         futureURL = url;
         url = urlFirst;
     }
     window.webBrowser1.Navigate(url);
 }
        public static void ShowFacebookLogin(string url, string urlFirst, ProfileLoginWindow parent, FacebookEventHandler loginCallback)
        {
            if (instance != null)
            {
                try
                {
                    instance.Close();
                    instance = null;
                }
                catch (Exception)
                {
                }
            }
            vidLoaded = false;
            FacebookWindow window = new FacebookWindow();

            m_parent = parent;
            Point point = new Point(parent.Location.X + ((parent.Width - window.Width) / 2), parent.Location.Y + ((parent.Height - window.Height) / 2));

            window.closeCallback = new MyFormBase.MFBClose(FacebookWindow.closing);
            window.Location      = point;
            window.Show(parent);
            instance = window;
            if (loginCallback != null)
            {
                instance.login = (FacebookEventHandler)Delegate.Combine(instance.login, loginCallback);
            }
            while (!vidLoaded)
            {
                Thread.Sleep(100);
                Application.DoEvents();
            }
            Thread.Sleep(500);
            if (urlFirst.Length > 0)
            {
                futureURL = url;
                url       = urlFirst;
            }
            window.webBrowser1.Navigate(url);
        }
 public static void ShowFacebookLogin(string url, string urlFirst, ProfileLoginWindow parent, FacebookEventHandler loginCallback)
 {
     if (instance != null)
     {
         try
         {
             instance.Close();
             instance = null;
         }
         catch (Exception)
         {
         }
     }
     vidLoaded = false;
     FacebookWindow window = new FacebookWindow();
     m_parent = parent;
     Point point = new Point(parent.Location.X + ((parent.Width - window.Width) / 2), parent.Location.Y + ((parent.Height - window.Height) / 2));
     window.closeCallback = new MyFormBase.MFBClose(FacebookWindow.closing);
     window.Location = point;
     window.Show(parent);
     instance = window;
     if (loginCallback != null)
     {
         instance.login = (FacebookEventHandler) Delegate.Combine(instance.login, loginCallback);
     }
     while (!vidLoaded)
     {
         Thread.Sleep(100);
         Application.DoEvents();
     }
     Thread.Sleep(500);
     if (urlFirst.Length > 0)
     {
         futureURL = url;
         url = urlFirst;
     }
     window.webBrowser1.Navigate(url);
 }